//
//  HACAnimator.h
//  HStockCharts
//
//  Created by Hotacool on 2018/1/2.
//

#import <Foundation/Foundation.h>

@class HACAnimator;
@protocol HACAnimatorDelegate <NSObject>
/// Called when the Animator has stepped.
- (void)animatorUpdated:(HACAnimator*)animator;
/// Called when the Animator has stopped.
- (void)animatorStopped:(HACAnimator*)animator;
@end

@interface HACAnimator : NSObject
@property (nonatomic, weak) id<HACAnimatorDelegate> delegate;
/// the phase that is animated and influences the drawn values on the x-axis
@property (nonatomic, assign) double phaseX;
/// the phase that is animated and influences the drawn values on the y-axis
@property (nonatomic, assign) double phaseY;
// duration of animation
@property (nonatomic, assign) NSTimeInterval duraton;

- (void)animateXWithDuration:(NSTimeInterval)duration ;
- (void)animateYWithDuration:(NSTimeInterval)duration ;
- (void)animateXYWithDuration:(NSTimeInterval)duration ;
- (void)stopAnimation ;
@end
